﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Orders.aspx.cs" Inherits="Chinesys.UI.Orders.Orders" %>

<%@ MasterType VirtualPath="~/Site.Master" %>
<%@ Register Src="../Controls/ValidationSummary.ascx" TagName="ValidationSummary"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link type="text/css" rel="Stylesheet" href="../Styles/CustomStyles.css" />
</asp:Content>
<asp:Content ID="OrdersPage" runat="server" ContentPlaceHolderID="MainContent">
    <script type="text/javascript">
        $(document).ready(function () {

            if ($('#hdnBizRulesException').val().length > 0) {
                var text = $('#hdnBizRulesException').val();
                $('#hdnBizRulesException').val('');
                $('#modalText').text(text);

                $("#modal").overlay({
                    top: 260,
                    mask: {
                        color: '#fff',
                        loadSpeed: 200,
                        opacity: 0.5
                    },
                    closeOnClick: false,
                    load: true
                });

            }

        });
    </script>
    <div>
        <asp:Label ID="lblInfo" CssClass="labelinfo" runat="server" Visible="false" />
        <asp:HiddenField ID="hdnBizRulesException" runat="server" ClientIDMode="Static" />
        <uc1:ValidationSummary ID="validationSummary" runat="server" />
    </div>
    <div class="contentDiv">
        <asp:Repeater ID="rptProductsGrid" runat="server" ViewStateMode="Enabled" OnItemCommand="rptProductsGrid_ItemCommand">
            <HeaderTemplate>
                <div class="productlist">
                    <ul>
            </HeaderTemplate>
            <ItemTemplate>
                <li class="itemcontainer">
                    <div id="productitem" class="productitem">
                        <asp:Image ID="Image1" CssClass="thumbnail" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ImageSrc")%>' />
                        <div class="producttitle">
                            <asp:Label ID="lblName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Name")%>' />
                        </div>
                        <div class="description">
                            <span class="brand">u$s
                                <%# DataBinder.Eval(Container.DataItem, "Price", "{0:0.##}")%></span>
                            <asp:Label ID="lblDescription" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Description")%>' />
                        </div>
                        <div class="buttons">
                            <asp:TextBox ID="txtQuantity" runat="server" Text="1" CssClass="textboxitem" />
                            <asp:ImageButton ID="ImageButton1" CssClass="item" runat="server" ImageUrl="../Images/Icons/Shopcart-Add_32.png"
                                ToolTip="Clic aqui para comprar esta pieza." CommandName="AddToCart" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id")%>' />
                        </div>
                    </div>
                </li>
            </ItemTemplate>
            <FooterTemplate>
                </ul> </div>
            </FooterTemplate>
        </asp:Repeater>
    </div>
    <div id="modal">
        <div>
            <h2>Mensaje del Sistema</h2>
            <p id="modalText">                
            </p>
            <button class="close">
                Cerrar
            </button>
        </div>
    </div>
</asp:Content>
